package forward.Module.Modules.Misc;

import java.awt.Color;

import forward.api.EventHandler;
import forward.api.Events.World.EventPreUpdate;
import forward.api.Value.Numbers;
import forward.Module.Module;
import forward.Module.ModuleType;

public class SpeedMine
extends Module {
	public static Numbers<Double> speed = new Numbers<Double>("Speed", "Speed", 0.7, 0.0, 1.0, 0.1);
    public SpeedMine() {
        super("SpeedMine", new String[]{"SpeedMine", "SpeedMine"}, ModuleType.Misc);
        this.setColor(new Color(223, 233, 233).getRGB());
        this.addValues(this.speed);
    }
    
    @EventHandler
    private void onUpdate(EventPreUpdate e) {
        this.mc.playerController.blockHitDelay = 0;
        if (this.mc.playerController.curBlockDamageMP < this.speed.getValue()) return;
        this.mc.playerController.curBlockDamageMP = 1.0f;
    }
}
